sky = ['jia','yi','bing','ding','wu','ji','geng','xin','ren','gui']
earth = ['zi','chou','yin','mao','chen','si','wu','wei','shen','you','xu','hai']

years = [sky[i % 10] + earth[i % 12] for i in range(60)]

name, year = 'gengzi', 2020
index, mod = years.index(name), year % 60

n = int(input()) % 60

print(years[n - mod + index])